<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/wesite/view/common/base.jsp"%>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>退货申请</title>
    <%@ include file="/wesite/view/common/common.jsp"%>
</head>
<body>
    <div class="return-of-goods">
        <div class="top">
            <h3>退货须知：</h3>
            <p>1.选择订单产品进行退货</p>
            <p>2.请填退货原因并及时与我们工作人员联系</p>
        </div>
        <div class="shopping-cart">  
            <ul>
                <li>
                    <div class="delete-btn"></div>
                    <div class="img">
                        <div class="not-available-tips">无货</div>
                        <img src="../../images/temp/temp-product.jpg">
                    </div>
                    <div class="con">
                        <h3>波罗的海蜜蜡精品手串配南红经典款手串/低</h3>
                        <div class="data">
                            <p>生产厂家：海南普利制药股份有限公司</p>
                            <p>规格：0.5g：2.5mg*10袋</p>
                            <p><span>件装：400袋/件</span><span>中/大包装：10袋/件</span></p>
                            <span class="price">￥<i>3500.00</i></span>
                            <div class="count-box">
                                <i class="sy_minus">-</i>
                                <input class="num" type="text" value="1">
                                <i class="sy_plus">+</i>
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="delete-btn"></div>
                    <img src="../../images/temp/temp-product.jpg">
                    <div class="con">
                        <h3>波罗的海蜜蜡精品手串配南红经典款手串/低</h3>
                        <div class="data">
                            <p>生产厂家：海南普利制药股份有限公司</p>
                            <p>规格：0.5g：2.5mg*10袋</p>
                            <p><span>件装：400袋/件</span><span>中/大包装：10袋/件</span></p>
                            <span class="price">￥<i>3500.00</i></span>
                            <div class="count-box">
                                <i class="sy_minus">-</i>
                                <input class="num" type="text" value="1">
                                <i class="sy_plus">+</i>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="return-reason">
            <div class="hd"><h3>退货理由：</h3></div>
            <div class="content">
                <textarea placeholder="请填写您的退货理由"></textarea>
            </div>
        </div>
        <div class="upload-pic">
            <div class="hd"><h3>上传图片：</h3></div>
            <div class="content">
                <div class="pic">
                    <div class="close" onclick="javascript:deleteImg(this)"></div>
                    <img src="../../images/temp/temp-product.jpg">
                </div>
                <span class="upload">
                    <input type="file">
                </span>
            </div>
        </div>
        <div class="write-phone">
            <div class="hd"><h3>手机号码：</h3></div>
            <div class="content">
                <input type="text" placeholder="请填写您的手机号码">
            </div>
        </div>
        <div class="bottom-btn">
            <span>提交申请</span>
        </div>
    </div>
</body>
<script type="text/javascript">
    apiready = function(){
        api.parseTapmode();
    }
    /*添加数量*/
    $(document).ready (function(){
        var reg = /(.*[\:\：]\s*)([\+\d\.]+)(\s*元)/g;
        $ (".sy_minus").click (function (){
            var me = $ (this), txt = me.next (":text"), pc = me.closest("p");
            var val = parseFloat (txt.val ());
            val = val < 1 ? 1 : val;
            txt.val (val - 1);
            var price = parseFloat (pc.prev("p").text().replace(reg,'$2')) * txt.val ();
            pc.next("p").text (pc.next("p").text().replace(reg, "$1" + price + "$3"));
            var num = $(this).siblings('input').val();
            $(this).parent().parent().find('.data i.num').html(num)
        });
         
        $(".sy_plus").click (function (){
            var me = $ (this), txt = me.prev (":text"), pc = me.closest("p");
            var val = parseFloat (txt.val ());
            txt.val (val + 1);
            var price = parseFloat (pc.prev("p").text().replace(reg,'$2')) * txt.val ();
            pc.next("p").text (pc.next("p").text().replace(reg, "$1" + price + "$3"));
            var num = $(this).siblings('input').val();
            $(this).parent().parent().find('.data i.num').html(num)
        });
    })[0].onselectstart = new Function ("return false");

    /*删除图片*/
    function deleteImg(obj){
        $(obj).parents('.pic').remove();
    }
</script>
</html>